﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="user_grantgroup.aspx.cs" Inherits="user_grantgroup" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>权限分组管理</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="../css/ss01.css"/>
	<base target="_self" />
    <script language="JScript" src="../js/Function.js"></script>
    <script language="JScript" src="../js/myCheck.js"></script>
    <script type="text/javascript" language="javascript">
		function chk() 
		{
			if(CheckText(form1.txtcode,"代码",20)==false) return false;
			if(CheckText(form1.txtname,"名称",20)==false) return false;
			if(CheckNum(form1.txtsort,"顺序")==false) return false;

			return true;
		}
        
        function opengroupfunc(grpcode)
        {
			features = "dialogWidth=520px;dialogHeight=370px;scroll=yes;help=no;status=no;resizable=yes;";
			window.showModalDialog('user_group_func.aspx?grpcode='+grpcode+'&_='+(new Date()).getTime(),null,features);
        }
    </script>
</head>
<body style="background-color:#0075b0;">
    <form id="form1" runat="server">
    <div>
		<table cellSpacing="0" cellPadding="0" border="0" align="center">
		    <tr>
		        <td style="background-color:White;padding-right: 10px; padding-left: 10px; padding-bottom: 10px; padding-top: 10px;">
		            <table cellSpacing="0" cellPadding="0" width="500" align="center" border="0" style="background-color:White;">
		                <tr>
		                    <td style="BORDER-RIGHT: #90b0de 1px solid; BORDER-TOP: #90b0de 1px solid; BORDER-LEFT: #90b0de 1px solid; BORDER-BOTTOM: #90b0de 1px solid">
		                        <table width="100%" cellSpacing="0" cellPadding="0" align="center" border="0">
		                            <tr height="30">
		                                <td style="border-bottom: #90b0de 1px solid; background-color: #ecf5ff; font-weight: bold; color: #004499; border-top-width: 1px; border-left-width: 1px; border-left-color: #90b0de; border-top-color: #90b0de; border-right-width: 1px; border-right-color: #90b0de;">&nbsp;&nbsp;&nbsp;权限分组管理</td>
		                            </tr>
		                        </table>
                                <div id="mnginput" style="margin-top:10px;margin-bottom:10px;margin-left:10px;">
                                    <table>
                                        <tr>
                                            <td>代码<font color="red">(<asp:literal id="msg" runat="server" Text="*"></asp:literal>)</font></td>
                                            <td>名称</td>
                                            <td>顺序</td>
                                        </tr>
                                        <tr>
                                            <td><asp:TextBox ID="txtcode" runat="server" Width="80px"></asp:TextBox></td>
                                            <td><asp:TextBox ID="txtname" runat="server" Width="130px"></asp:TextBox><asp:checkbox id="isshow" runat="server" Text="显示" Checked="True"></asp:checkbox></td>
                                            <td><asp:TextBox ID="txtsort" runat="server" Width="40px">0.00</asp:TextBox></td>
                                        </tr>
                                    </table>
                                </div>
                                <div id="Div1" style="margin-top:10px;margin-bottom:0px;margin-left:10px;">
		                            <table cellSpacing="0" cellPadding="0" width="100%" border="0">
			                            <tr>
				                            <td height="24">
                                                <asp:button id="btnInsert" runat="server" Text="插入系统" OnClick="btnInsert_Click"></asp:button>
					                            <asp:button id="btnUpdate" runat="server" Text="保存修改" OnClick="btnUpdate_Click" Enabled="False"></asp:button>
					                            <asp:button id="btnCancel" runat="server" Text="取消修改" OnClick="btnCancel_Click" Enabled="False"></asp:button>
				                            </td>
			                            </tr>
		                            </table>
                                </div>
                                <div style="border-top: #90b0de 1px solid;"></div>
                                <div id="mnglist" style="margin-top:10px;margin-bottom:10px;margin-left:10px;margin-right:10px;">
                                    <asp:DataList ID="dlTable" runat="server" OnItemCommand="dlTable_ItemCommand" Width="100%">
				                        <HeaderTemplate>
					                        <table width="100%" cellpadding="2" cellspacing="2">
						                        <tr>
							                        <td width="100" style="font-weight:bold;">代码</td>
							                        <td style="font-weight:bold;">名称</td>
							                        <td align="center" width="50" style="font-weight:bold;">功能</td>
							                        <td align="center" width="50" style="font-weight:bold;">显示</td>
							                        <td align="center" width="80" style="font-weight:bold;">顺序</td>
							                        <td width='50'>&nbsp;</td>
						                        </tr>
			                                </table>
				                        </HeaderTemplate>
				                        <ItemTemplate>
					                        <table width="100%" cellpadding="2" cellspacing="2">
					                            <tr>
						                            <td width='100'><asp:linkbutton id="lbModify" runat="server" CommandName="Modify" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "grpcode") %>'><%#  DataBinder.Eval(Container.DataItem, "grpcode") %></asp:linkbutton></td>
						                            <td ><%#  DataBinder.Eval(Container.DataItem, "grpname") %></TD>
						                            <td align="center" width='50'><span onclick="opengroupfunc('<%#  DataBinder.Eval(Container.DataItem, "grpcode") %>')" style="cursor:hand;">授权</span></TD>
						                            <td align="center" width='50'><%#  DataBinder.Eval(Container.DataItem, "status") %></TD>
						                            <td align="center" width='80'><%#  DataBinder.Eval(Container.DataItem, "sortnum") %></TD>
						                            <td align="center" width='50'><asp:linkbutton id="lbDelete" runat="server" CommandName="Delete" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "grpcode") %>'><img border="0" src="../images/delete.gif" alt="删除" onClick="javascript:{return confirm('删除操作不可恢复，确认吗？');}"></asp:linkbutton></td>
					                            </tr>
			                                </table>
				                        </ItemTemplate>
                                        <FooterTemplate>
			                            </FooterTemplate>
                                        <AlternatingItemStyle BackColor="#ECF5FF" />
                                        <SelectedItemStyle BackColor="#cee5fd" />
                                     </asp:DataList>
                                </div>
		                    </td>
		                </tr>
		            </table>
		        </td>
		    </tr>
		</table>
		
    </div>
	<div id="myhidediv" style="VISIBILITY: hidden;">
	    <asp:textbox id="grpcode" runat="server" Width="2"></asp:textbox>
	</div>
    </form>
</body>
</html>
